package net.wofly.sale.stock.service;

import java.util.List;

import net.wofly.sale.report.domain.OutStockDTO;
import net.wofly.sale.stock.domain.OutStock;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;

public interface IOutStockService {

	/**
	 * 增加或修改
	 * 
	 * @param entity
	 * @return
	 */
	public OutStock save(OutStock entity);

	/**
	 * 删除
	 * 
	 * @param entity
	 * @return
	 */
	public void delete(OutStock entity);

	/**
	 * 根据主键ID删除
	 * 
	 * @param key
	 * @return
	 */
	public void delete(String key);

	/**
	 * 根据主键查询
	 * 
	 * @param key
	 * @return
	 */
	public OutStock findOne(String key);
	
	OutStock findByProofID(String proofID);
	
	public Page<OutStock> findAll(Specification specification , Pageable pageable);
	
	public List<OutStock> save(List<OutStock> entityList) ;

	/**
	 * 查询销售数量
	 *
	 * @param countDate
	 * @param countEndTime
     * @return
     */
	List<OutStockDTO> findByCountDate(Long countDate, Long countEndTime);
}
